import request from '@/utils/request'

//新闻列表
export function newsList() {
  return request({
    url: '/news/article/list',
    method: 'get'
  })
}

// 文章阅读
export function newsRead(data) {
  return request({
    url: '/news/article/read',
    method: 'post',
    data
  })
}

// 关闭文章
export function newsClose(data) {
  return request({
    url: '/news/article/close',
    method: 'post',
    data
  })
}

//文章点赞
export function newsLike(data) {
  return request({
    url: '/news/article/like',
    method: 'post',
    data
  })
}


//问卷列表
export function newsQuestionnaire() {
  return request({
    url: '/news/user/questionnaire',
    method: 'get'
  })
}

//提交问卷
export function userAnswer(data) {
  return request({
    url: '/news/user/answer',
    method: 'post',
    data
  })
}


//更新阅读进度
export function newsProgress(data) {
  return request({
    url: '/news/article/progress',
    method: 'post',
    data
  })
}

//注意力测试题
export function articleCheckQuestion() {
  return request({
    url: '/news/article/checkQuestion',
    method: 'post',
    data: {}
  })
}

//注意力测试答案
export function articleCheckAnswer(data) {
  return request({
    url: '/news/article/checkAnswer',
    method: 'post',
    data
  })
}

// 定期上报目前浏览的文章
export function articleBrowseRange(data) {
  return request({
    url: '/news/article/browseRange',
    method: 'post',
    data
  })
}


// 开始结束、上报心情
export function articleCurrentEmotion(data) {
  return request({
    url: '/news/article/currentEmotion',
    method: 'post',
    data
  })
}

